
using System.Collections;
using QdbUnit;
using QdbUnit.Tests;
using Qdb.Foundation;
using Sharpen.Lang;

namespace QdbUnit.Tests
{
	public class TestLifeCycleTestCase : ITestCase
	{
		public virtual void TestLifeCycle()
		{
			ByRef tearDownCalled = ByRef.NewInstance(false);
			RunsLifeCycle._tearDownCalled.With(tearDownCalled, new _IRunnable_11());
			Assert.IsTrue((((bool)tearDownCalled.value)));
		}

		private sealed class _IRunnable_11 : IRunnable
		{
			public _IRunnable_11()
			{
			}

			public void Run()
			{
				IEnumerator tests = new ReflectionTestSuiteBuilder(typeof(RunsLifeCycle)).GetEnumerator
					();
				ITest test = (ITest)Iterators.Next(tests);
				FrameworkTestCase.RunTestAndExpect(test, 1);
			}
		}
	}
}
